<?php
	include 'File.class.php';
	/**
	* 
	*/
	class JSON extends File
	{		
		public function getJSON($json)
		{
			$file = parent::getFile($json);			
			try {
				$obj = json_decode($file,true);	
			} catch (Exception $e) {
				$obj = "Error ao compilar JSON:".$e;
			}		
			return $obj;
		}
		public function getXml($uri)
		{
			$json = json_encode( simplexml_load_file($uri) );
			return $json;
		}
	}
?>